﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Sub_NoRight : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

        LinQ_RaoVatDataContext linQ = new LinQ_RaoVatDataContext();


        var TopLeft =
            from vt in linQ.VI_TRI_QUANG_CAOs where vt.TenLoaiViTri == "TopLeft" && vt.Deleted == false select vt;

        if (TopLeft.Count() > 0)
        {
            Banner1.ViTriQuangCao = TopLeft.First();
        }

        var BottomLeft =
                from vt in linQ.VI_TRI_QUANG_CAOs where vt.TenLoaiViTri == "BottomLeft" && vt.Deleted == false select vt;

        if (BottomLeft.Count() > 0)
        {
            Banner2.ViTriQuangCao = BottomLeft.First();
        }
    }
}
